Compression Quality Constants
Compressor components may allow applications to assert some control over the image quality that results from a compression or decompression operation. For example, theCompressSequenceBegin
function (described on page 3-110) provides thespatialQuality
andtemporalQuality
parameters so that applications can indicate the level of image accuracy desired within individual frames and across adjacent frames in a sequence, respectively. These quality values become a property of the compressed data and are stored in the image description structure (described on page 3-43) associated with the image or sequence.For a given compression operation, your application can determine the quality that the component supports by issuing the
GetCompressionTime
function (described on page 3-64).The
CodecQ
data type defines a field that identifies the quality characteristics of a given image or sequence. Note that individual components may not implement all the quality levels shown here. In addition, components may implement other quality levels in the range fromcodecMinQuality
tocodecMaxQuality
. Relative quality should scale within the defined value range. Values abovecodecLosslessQuality
are reserved for use by individual components.
/* compression quality values */ #define codecMinQuality 0x000L /* minimum valid value */ #define codecLowQuality 0x100L /* low-quality reproduction */ #define codecNormalQuality 0x200L /* normal-quality repro */ #define codecHighQuality 0x300L /* high-quality repro */ #define codecMaxQuality 0x3FFL /* maximum-quality repro */ #define codecLosslessQuality 0x400L /* lossless-quality repro */ typedef unsigned long CodecQ;Constant descriptions
codecMinQuality
- Specifies the minimum valid value for a
CodecQ
field.codecLowQuality
- Specifies low-quality image reproduction. This value should correspond to the lowest image quality that still results in acceptable display characteristics.
codecNormalQuality
- Specifies image reproduction of normal quality.
codecHighQuality
- Specifies high-quality image reproduction. This value should correspond to the highest image quality that can be achieved with reasonable performance.
codecMaxQuality
- Specifies the maximum standard value for a
CodecQ
field.codecLosslessQuality
- Specifies lossless compression or decompression. This special value is valid only for components that can support lossless compression or decompression.